import type { FC } from 'react';
import Feather from '@expo/vector-icons/Feather';
import IconText from '../iconText';
import { useDetails } from '../hooks';
import { formatDate } from '@/utils/helper';

type TimesProps = {

}

const Times: FC<TimesProps> = () => {
  const { startTime, endTime } = useDetails();

  const text = [
    formatDate(startTime, false),
    formatDate(endTime, false)
  ].join(' - ');

  return (
    <IconText
      text={text}
      textFlex={1}
      fontSize={14}
      iconWidth={16}
      fontColor="#000"
    >
      <Feather
        name="clock"
        size={15}
        color='#666'
      />
    </IconText>
  );
}

export default Times;